Skip to content

fix(sync): preserve WebDAV remote root casing#425

Merged
codedogQBY merged 2 commits into
mainfrom
codex/fix-webdav-path-filenames
Jul 5, 2026
Merged

fix(sync): preserve WebDAV remote root casing#425
codedogQBY merged 2 commits into
mainfrom
codex/fix-webdav-path-filenames

Conversation

@codedogQBY

@codedogQBY codedogQBY commented Jun 12, 2026

Copy link
Copy Markdown
Owner

Analysis

Issue #169 reports that saving a WebDAV remote folder with uppercase letters rewrites the path to lowercase. The root cause is sanitizeWebDavRemoteRoot(): it trims and collapses slashes, but also called .toLowerCase(). WebDAV paths are often case-sensitive, so this can point sync/import at a different remote directory.

Issue #383 reports the same mobile WebDAV failure mode when uppercase letters are used: uploads fail after the configured WebDAV path/casing is changed. Preserving the configured root casing fixes that path mismatch.

Issue #178 is the related filename/path safety case for Chinese/Japanese WebDAV book paths. The current client already builds request URLs by percent-encoding path segments; this PR adds regression coverage to keep those Unicode paths in the URL and out of custom request headers.

Changes

  • Preserve WebDAV remote root casing while still trimming control characters, outer slashes, and duplicate slashes.
  • Update sync store coverage so saved WebDAV configs keep Apps/ReadAny-Sync exactly instead of lowercasing it.
  • Add WebDAV client coverage for non-ASCII book paths, verifying the request URL is percent-encoded and the request headers remain ASCII-only auth headers.

Verification

  • pnpm exec biome check packages/core/src/sync/webdav-client.ts packages/core/src/sync/webdav-client.test.ts packages/core/src/stores/sync-store.test.ts
  • pnpm --filter @readany/core test -- webdav-client sync-store
  • pnpm --filter @readany/core test -- sync-files simple-sync webdav-client

Fixes #169
Fixes #383
Fixes #178

@codedogQBY codedogQBY added bug Something isn't working priority:p1 High: important feature broken or major platform/workflow regression area:sync Sync, WebDAV, S3, remote storage area:import Import, download, file handling, format support area:desktop Desktop, Tauri, Windows, macOS, Linux area:mobile Mobile, tablet, React Native, Android, iOS labels Jun 12, 2026
@codedogQBY codedogQBY merged commit 7080527 into main Jul 5, 2026
@codedogQBY codedogQBY deleted the codex/fix-webdav-path-filenames branch July 5, 2026 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:desktop Desktop, Tauri, Windows, macOS, Linux area:import Import, download, file handling, format support area:mobile Mobile, tablet, React Native, Android, iOS area:sync Sync, WebDAV, S3, remote storage bug Something isn't working priority:p1 High: important feature broken or major platform/workflow regression

Projects

None yet

1 participant